package Java0307;

import java.util.Scanner;

public class TaxDemo {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入工资：");
        double wages = sc.nextDouble();
        if (wages < 3500) {
            System.out.println("低于3500，不交税。");
        } else if (wages < 8000) {
            System.out.println("工资是" + wages + "元，需要交个人所得税" + (wages - 3500) * 0.05 + "元");
        } else if (wages < 15000) {
            System.out.println("工资是" + wages + "元，需要交个人所得税" + ((wages - 8000) * 0.1 + 4500 * 0.05) + "元");
        } else {
            System.out.println("工资是" + wages + "元，需要交个人所得税" + ((wages - 15000) * 0.15 + 7000 * 0.1 + 4500 * 0.05) + "元");
        }

    }
}
